#include "tcpserver.hpp"
using namespace std;

void usage(string proName){
    cout<<"\n\rusage:"<<proName<<" port[1024+]"<<endl;
}
int main(int argc,char* argv[]){
    if(argc!=2){
        usage(argv[0]);
        exit(1);
    }
    uint16_t port=stoi(argv[1]);
    log.Enable(Classfile);
    unique_ptr<TcpServer> tcps(new TcpServer(port));
    tcps->init();
    tcps->start4();
    return 0;
}